const path = require('path')

module.exports = {
  mode: 'development',
  entry: './index.js',
  output: {
    path: path.resolve(__dirname, './dist')
  },
  resolveLoader: {
    // 定义简写modules，当寻找loader时，先去node_modules寻找，再到loaders文件夹寻找
    modules: ['node_modules', 'loaders']
  },
  module: {
    rules: [
      {
        test: /\.js$/,
        use: [
          {
            loader: 'replaceLoader',
            options: {
              name: 'lqm'
            }
          },
          {
            loader: 'replaceLoaderAsync',
            options: {
              asyncName: 'chl'
            }
          }
        ]
      }
    ]
  }
}
